package sv.gob.mh.dgii.security;

import java.util.Collection;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.ldap.userdetails.LdapUserDetails;

public class DGIIUserDetailsImpl implements LdapUserDetails {
	
	private static final long serialVersionUID = -3654173063382493897L;
	private final LdapUserDetails ldapUserDetails;
	private String email;
	private String nit;
	private String displayName;
	private String cadmTrib;
	private String rol;
	private String ssello;
	private Long itecnico;
	private String ubicacionFisica;
	private String unidadRecep;
	private String rawPassword;
	/***Parametros DET****/
	private String detFtpHost;
	private String detFtpUsr;
	private String detFtpPass;
	private String detFtpInitialDir;

	 
	public String getUnidadRecep() {
		return unidadRecep;
	}

	public void setUnidadRecep(String unidadRecep) {
		this.unidadRecep = unidadRecep;
	}

	public String getUbicacionFisica() {
		return ubicacionFisica;
	}

	public void setUbicacionFisica(String ubicacionFisica) {
		this.ubicacionFisica = ubicacionFisica;
	}

	private String nadmTrib;// Nombre de Despliegue Admin Trib

	public String getUnidad() {
		return unidad;
	}

	public void setUnidad(String unidad) {
		this.unidad = unidad;
	}

	private String unidad;

	public String getCadmTrib() {
		return cadmTrib;
	}

	public void setCadmTrib(String cadmTrib) {
		this.cadmTrib = cadmTrib;
	}

	public DGIIUserDetailsImpl(LdapUserDetails ldapUserDetails) {
		this.ldapUserDetails = ldapUserDetails;
	}


	public String getNit() {
		return nit;
	}

	public void setNit(String nit) {
		this.nit = nit;
	}

	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}


	public Collection<? extends GrantedAuthority> getAuthorities() {
		System.out.println("Probando...");
		return ldapUserDetails.getAuthorities();
	}

	public String getDn() {
		return ldapUserDetails.getDn();
	}

	public String getPassword() {
		return ldapUserDetails.getPassword();
	}

	public String getUsername() {
		return ldapUserDetails.getUsername();
	}

	public boolean isAccountNonExpired() {
		return ldapUserDetails.isAccountNonExpired();
	}

	public boolean isAccountNonLocked() {
		return ldapUserDetails.isAccountNonLocked();
	}

	public boolean isCredentialsNonExpired() {
		return ldapUserDetails.isCredentialsNonExpired();
	}

	public boolean isEnabled() {
		return ldapUserDetails.isEnabled();
	}

	public String getUsuario() {
		return ldapUserDetails.getUsername();
	}

	public String getRol() {
		return rol;
	}

	public void setRol(String rol) {
		this.rol = rol;
	}

	public Long getItecnico() {
		return itecnico;
	}

	public void setItecnico(Long itecnico) {
		this.itecnico = itecnico;
	}

	public String getSsello() {
		return ssello;
	}

	public void setSsello(String ssello) {
		this.ssello = ssello;
	}

	public String getNadmTrib() {
		return nadmTrib;
	}

	public void setNadmTrib(String nadmTrib) {
		this.nadmTrib = nadmTrib;
	}

	public String getDetFtpHost() {
		return detFtpHost;
	}

	public void setDetFtpHost(String detFtpHost) {
		this.detFtpHost = detFtpHost;
	}

	public String getDetFtpUsr() {
		return detFtpUsr;
	}

	public void setDetFtpUsr(String detFtpUsr) {
		this.detFtpUsr = detFtpUsr;
	}

	public String getDetFtpPass() {
		return detFtpPass;
	}

	public void setDetFtpPass(String detFtpPass) {
		this.detFtpPass = detFtpPass;
	}

	public String getDetFtpInitialDir() {
		return detFtpInitialDir;
	}

	public void setDetFtpInitialDir(String detFtpInitialDir) {
		this.detFtpInitialDir = detFtpInitialDir;
	}

	public String getRawPassword() {
		return rawPassword;
	}

	public void setRawPassword(String rawPassword) {
		this.rawPassword = rawPassword;
	}

}
